﻿<header>
    <div class="search">
        <input id="searchBox" type="text" name="" value="@ViewBag.Keywords" placeholder="搜索全部商品..." />
        <i class="glyphicon glyphicon-search" id="searchBtn"></i>
    </div>
</header>
<script>
    $('#searchBtn').click(function () {
        var keywords = $('#searchBox').val();
        var vshopid = "@ViewBag.VshopId";
        if (vshopid.length < 1) {
            vshopid = QueryString('vshopId');
        }
        var jumpurl = '/' + areaName + '/search?keywords=' + encodeURIComponent(keywords);
        if (vshopid.length > 0) {
            jumpurl += "&vshopId=" + vshopid;
        }
        //alert(jumpurl);
        location.href = jumpurl;
    });
</script>
